<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./Promise.js"></script>
    <script>
        let p1 = new Promise((resolve, reject)=>{
            setTimeout(()=>{
                resolve('p1 ok');
            },300);
        })

        let p2 = new Promise((resolve,reject)=>{
            setTimeout(()=>{
                resolve('p2 ok');
            },500);
        })

        p2.then(value1=>{
            console.log(value1);
        })

        p2.then(value2=>{
            console.log(value2);
        })

        p1.then(value1=>{
            console.log(value1);
        })

        p1.then(value2=>{
            console.log(value2);
        })
    </script>
</head>
<body>
    
</body>
</html>